﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using University.Workshop.DataAccess;
using System.Data;

namespace University.Workshop.Business
{
    public static class RoleManager
    {
        //string ciUser;
        //public void RoleFacade(string user) 
        //{
        //    ciUser = user;
        //}

        public static bool PermissionUser(string ciUser, string nameComponent)
        {
            DataTable permission = RoleDataAccess.VerifyPermission(ciUser,nameComponent);
            return permission.Rows.Count > 0;
        }

        public static DataTable LoadManagerRoles()
        {            
            return RoleDataAccess.LoadDataRoles();
        }
    }
}
